<?php
    $this->title = "Pannello Amministrazione";
    $this->headTitle($this->title);
    $club = $this->club;
    $id = $this->admin;

    $allDisco = $this->allDisco;
    $zonaList = $this->zonaList;
?>
<?php
/**
 *  dispay all disco in  sponsor0
 */
$line = '<div id="box">';
foreach ($allDisco as $key=>$allDisco2){
    $line_new = '<h2><a href="'. $this->url(array('controller'=>'Club',
                                                  'name'=> $allDisco2[0],
                                                   ), 'locale', TRUE) .'">' . $allDisco2[1]
              . '</a></h2>';
    $line = $line . $line_new;
    }
$line = $line . '</div>';
$this->layout()->sponsor0 = $line;

/**
 * dispay all "provincia" in  provincia
 */
$line4 = '';
foreach ($zonaList as $key=>$zonaList2){
    $line4_new = '<h2><a href="'. $this->url(array('controller'=>'Index',
                                                    'action'=>'provincia',
                                                    'id'=> $zonaList2,
                                                   ), 'index', TRUE) .'">' . $zonaList2 . '</a></h2>';
    $line4 = $line4 . $line4_new;
    }
$line4 = $line4 . '';
$this->layout()->provincia = $line4;
?>
<?php
    foreach ($club as $club2):
    echo "<h4>Locale: " . $club2['name'] . "</h4>";
?>
<table>
    <tbody>
        <tr>
            <td>Area Eventi</td>
            <td>
                <ul class="admin_ul">
                    <li><a href="<?php echo $this->url(array('controller'=>'admin','action'=>'create-disco-event', 'piva'=>$club2['piva']), 'admin', TRUE);?>">Inserisci evento</a></li>
                    <li><a href="<?php echo $this->url(array('controller'=>'admin','action'=>'show-disco-event', 'piva'=>$club2['piva']), 'admin', TRUE);?>">Modifica o disattiva un evento</a></li>
                </ul>
            </td>
        </tr>
        <tr>
            <td>Area Club</td>
            <td>
                <ul class="admin_ul">
                    <li><a href="<?php echo $this->url(array('controller'=>'club','action'=>'update-club', 'name'=>$club2['name'], 'piva'=>$club2['piva']), 'club', TRUE);?>">Modifica la homepage club</a></li>
                    <li><a href="<?php echo $this->url(array('controller'=>'club','action'=>'update-club-image', 'name'=>$club2['name'], 'piva'=>$club2['piva']), 'club', TRUE);?>">Modifica il Logo del club</a></li>
                    <li><a href="<?php echo $this->url(array('controller'=>'club','action'=>'upload-club-img', 'name'=>$club2['name'], 'piva'=>$club2['piva']), 'club', TRUE);?>">Inserisci una foto all'interno della galleria</a></li>
                    <li><a href="<?php echo $this->url(array('controller'=>'club','action'=>'edit-club-img', 'name'=>$club2['name'], 'piva'=>$club2['piva']), 'club', TRUE);?>">Elimina una foto dalla galleria</a></li>
                </ul>
            </td>
        </tr>
        <tr>
            <td>Area info</td>
            <td>
                <ul class="admin_ul">
                    <li>Visualizza la tua Home page: <a href="<?php echo $this->url(array('controller'=>'Club', 'name'=>$club2['unique_name']), 'locale', TRUE);?>">www.whichclub.it/<?php echo $club2['unique_name']?></a></li>
                    <li><a href="<?php echo $this->url(array('controller'=>'club','action'=>'show-admin-info'), 'club', TRUE);?>">Visualizza informazioni personali</a></li>
                </ul>
            </td>
        </tr>
    </tbody>
</table>
<?php endforeach;?>
<h5>
    <a href="<?php echo $this->url(array(
                                'controller'=>'Index',
                                'action'=>'index'),
                                'index', TRUE);
                ?>"><- indietro
    </a>
</h5>